package com.yuju.upload.enums;

import com.yuju.enums.ReturnCodeEnum;

public enum MultimediaReturnCodeEnum {
	MULTIMEDIA_TYPE_SAVE_SUCCESS("filesvr-1000", "资源分类保存成功"),
	MULTIMEDIA_TYPE_SAVE_FALURE("filesvr-1001", "资源分类保存失败"),
	MULTIMEDIA_SAVE_SUCCESS("filesvr-1002", "资源保存成功"),
	MULTIMEDIA_SAVE_FALURE("filesvr-1003", "资源保存失败"),
	MULTIMEDIA_DEL_FALURE("filesvr-1003", "资源删除失败");
	
	private String code;
	private String desc;
	
	MultimediaReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static String getDescByCode(String code) {
		for (ReturnCodeEnum enume : ReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		return "未知枚举项";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
